package cc.lj.internal.core.exception;

/**
 * 系统级别异常枚举
 */
public enum SysExceptionEnum implements IGlobalExceptionEnum {

    //==========系统级别=============
    SUCCESS(1,"成功"),
    SYS_ERROR(2001001000, "服务端发生异常"),
    REPEAT_REQUEST(2001001001,"重复提交请求"),
    MISSING_REQUEST_PARAM_ERROR(2001001002, "参数缺失"),
    VOLIDATION_ERROR(2001001003, "参数验证失败");

    //错误码
    private int code;
    //错误提示
    private String message;
    //构造器
    SysExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
